package com.company.test.Synchronized;

public class Person {

    public String name = "zhangsan";


    public synchronized void sayHello() throws InterruptedException {

        Thread.sleep(5000);
        System.out.println("hello world");
    }

    public synchronized static void sayHello2() throws InterruptedException {
        Thread.sleep(5000);
        System.out.println("hello world");
    }


    public synchronized static void sayHello3(){
        System.out.println("hello 3");
    }
}
